//
//  ZLDetailHeaderReusableView.m
//  TripTogether
//
//  Created by dllo on 15/12/24.
//  Copyright © 2015年 杨泓晔. All rights reserved.
//

#import "ZLDetailHeaderReusableView.h"
#import "Masonry.h"

@implementation ZLDetailHeaderReusableView


- (instancetype)initWithFrame:(CGRect)frame
{
    self = [super initWithFrame:frame];
    if (self) {
        
        UILabel *myLabel = [[UILabel alloc]init];
        myLabel.textAlignment = NSTextAlignmentCenter;
        [self addSubview:myLabel];
        [myLabel mas_makeConstraints:^(MASConstraintMaker *make) {
            make.top.bottom.equalTo(self);
            make.left.equalTo(self.mas_left).offset(130*AUTO_WIDTH);
            make.right.equalTo(self.mas_right).offset(-130*AUTO_WIDTH);
        }];
        myLabel.text = @"推荐地点";
        
        UIView *lineOneView = [UIView new];
        lineOneView.backgroundColor = [UIColor lightGrayColor];
        [self addSubview:lineOneView];
        [lineOneView mas_makeConstraints:^(MASConstraintMaker *make) {
            make.left.offset(50*AUTO_WIDTH);
            make.right.equalTo(myLabel.mas_left);
            make.top.offset(15);
            make.bottom.offset(-14);
        }];
        
        
        UIView *lineTwoView = [UIView new];
        lineTwoView.backgroundColor = [UIColor lightGrayColor];
        [self addSubview:lineTwoView];
        [lineTwoView mas_makeConstraints:^(MASConstraintMaker *make) {
            make.right.offset(-50*AUTO_WIDTH);
            make.left.equalTo(myLabel.mas_right);
            make.top.offset(15);
            make.bottom.offset(-14);
        }];
        
    }
    return self;
}



@end
